package fileHandling;

import java.io.File;

import logic.common.team.Fraction;

public class FolderManager {
	
	public static final String DATA = "data/";
	public static final String TEXTURES = DATA + "textures/";
	public static final String TEX_HUD = TEXTURES + "hud/";
	
	public static final String FRACTIONS = DATA + "fractions/";
	public static final String MINES = "mines";
	
	public static String fractionDir(Fraction fraction, String... lowerDirs) {
		StringBuilder builder = new StringBuilder(FRACTIONS);
		builder.append(fraction.toString().toLowerCase());
		builder.append("/");
		
		for(String dir : lowerDirs) {
			builder.append(dir);
			builder.append("/");
		}
		
		return builder.toString();
	}
	
	public static boolean isDir(File file) {
		return file.isDirectory() && !file.getPath().contains(".");
	}
}